package com.yidu.ladder.delivery.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 运费包装类
 * 
 * @author yy
 * @since 2019-12-20
 *
 */
public class CalculateFeeVo implements Serializable {

	/**
	 * 序列号
	 */
	private static final long serialVersionUID = -5235853699508992699L;

	/**
	 * 开始省
	 */
	private String startProvince;
	/**
	 * 开始城市
	 */
	private String startCity;
	/**
	 * 开始县
	 */
	private String startCounty;
	/**
	 * 目的省
	 */
	private String endProvince;
	/**
	 * 目的城市
	 */
	private String endCity;
	/**
	 * 目的县
	 */
	private String endCounty;
	/**
	 * 重量
	 */
	private BigDecimal weight;
	/**
	 * 寄件时间
	 */
	private Date postTime;

	/**
	 * 空的构造方法
	 */
	public CalculateFeeVo() {

	}

	/**
	 * 带有参数的构造方法
	 * 
	 * @param startProvince 开始省
	 * @param startCity     开始城市
	 * @param startCounty   开始县
	 * @param endProvince   目的省
	 * @param endCity       目的城市
	 * @param endCounty     目的县
	 * @param weight        重量
	 * @param postTime      寄件时间
	 */
	public CalculateFeeVo(String startProvince, String startCity, String startCounty, String endProvince,
			String endCity, String endCounty, BigDecimal weight, Date postTime) {
		super();
		this.startProvince = startProvince;
		this.startCity = startCity;
		this.startCounty = startCounty;
		this.endProvince = endProvince;
		this.endCity = endCity;
		this.endCounty = endCounty;
		this.weight = weight;
		this.postTime = postTime;
	}

	public String getStartProvince() {
		return startProvince;
	}

	public void setStartProvince(String startProvince) {
		this.startProvince = startProvince;
	}

	public String getStartCity() {
		return startCity;
	}

	public void setStartCity(String startCity) {
		this.startCity = startCity;
	}

	public String getStartCounty() {
		return startCounty;
	}

	public void setStartCounty(String startCounty) {
		this.startCounty = startCounty;
	}

	public String getEndProvince() {
		return endProvince;
	}

	public void setEndProvince(String endProvince) {
		this.endProvince = endProvince;
	}

	public String getEndCity() {
		return endCity;
	}

	public void setEndCity(String endCity) {
		this.endCity = endCity;
	}

	public String getEndCounty() {
		return endCounty;
	}

	public void setEndCounty(String endCounty) {
		this.endCounty = endCounty;
	}

	public BigDecimal getWeight() {
		return weight;
	}

	public void setWeight(BigDecimal weight) {
		this.weight = weight;
	}

	public Date getPostTime() {
		return postTime;
	}

	public void setPostTime(Date postTime) {
		this.postTime = postTime;
	}

	@Override
	public String toString() {
		return "CalculateFeeVo [startProvince=" + startProvince + ", startCity=" + startCity + ", startCounty="
				+ startCounty + ", endProvince=" + endProvince + ", endCity=" + endCity + ", endCounty=" + endCounty
				+ ", weight=" + weight + ", postTime=" + postTime + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((endCity == null) ? 0 : endCity.hashCode());
		result = prime * result + ((endCounty == null) ? 0 : endCounty.hashCode());
		result = prime * result + ((endProvince == null) ? 0 : endProvince.hashCode());
		result = prime * result + ((postTime == null) ? 0 : postTime.hashCode());
		result = prime * result + ((startCity == null) ? 0 : startCity.hashCode());
		result = prime * result + ((startCounty == null) ? 0 : startCounty.hashCode());
		result = prime * result + ((startProvince == null) ? 0 : startProvince.hashCode());
		result = prime * result + ((weight == null) ? 0 : weight.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CalculateFeeVo other = (CalculateFeeVo) obj;
		if (endCity == null) {
			if (other.endCity != null)
				return false;
		} else if (!endCity.equals(other.endCity))
			return false;
		if (endCounty == null) {
			if (other.endCounty != null)
				return false;
		} else if (!endCounty.equals(other.endCounty))
			return false;
		if (endProvince == null) {
			if (other.endProvince != null)
				return false;
		} else if (!endProvince.equals(other.endProvince))
			return false;
		if (postTime == null) {
			if (other.postTime != null)
				return false;
		} else if (!postTime.equals(other.postTime))
			return false;
		if (startCity == null) {
			if (other.startCity != null)
				return false;
		} else if (!startCity.equals(other.startCity))
			return false;
		if (startCounty == null) {
			if (other.startCounty != null)
				return false;
		} else if (!startCounty.equals(other.startCounty))
			return false;
		if (startProvince == null) {
			if (other.startProvince != null)
				return false;
		} else if (!startProvince.equals(other.startProvince))
			return false;
		if (weight == null) {
			if (other.weight != null)
				return false;
		} else if (!weight.equals(other.weight))
			return false;
		return true;
	}

}
